package com.tsing.service.impl;

import com.tsing.mapper.LoveMapper;
import com.tsing.mapper.impl.LoveMapperImpl;
import com.tsing.pojo.entity.TlLove;
import com.tsing.service.LoveService;

import java.util.List;

/**
 * @auth 卢孝宇
 * @date 2023/12/10 16:15
 */
public class LoveServiceImpl implements LoveService {
    private final LoveMapper loveMapper = new LoveMapperImpl();
    @Override
    public List<TlLove> loveCount(Long userId, Long postId) {
        List<TlLove> loveCount = loveMapper.loveCount(userId,postId);
        return loveCount;
    }

    @Override
    public Integer add(Integer userId, Integer postId) {
        return loveMapper.add(userId,postId);
    }

    @Override
    public Integer delete(Integer userId, Integer postId) {
        return loveMapper.delete(userId,postId);
    }
}
